package com.situ.shoplook.dubbo.dao;

import com.situ.shoplook.common.model.Category;
import com.situ.shoplook.common.model.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author:yzy
 * @date:2024/9/2
 */
@Mapper
public interface ProductDao {
    List<Product> findAll(String name);
    int save(Product product);

    int update(Product product);
    int deleteByIds(@Param("ids") Integer[] ids);

    List<Product> findByName(String name);

    List<Product> findById(Integer id);

    Product findOneProduct(Integer id);

    List<Product> findByCategoryId(Integer id);

    List<Product> findBest();
}
